package com.lanqiao.mapper;

import com.github.pagehelper.Page;
import com.lanqiao.vo.District;
import com.lanqiao.vo.House;
import com.lanqiao.vo.Street;
import com.lanqiao.vo.Types;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by Administrator on 2018/10/4.
 */
@Repository
public interface HouseMapper {

    /**
     * @param house
     * @param pageNum
     * @param pageSize
     * @return
     */
    List<House> selectBySelective(@Param("h") House house,
                                  @Param("pageNum") int pageNum,
                                  @Param("pageSize") int pageSize);

    List<District> selectDistrict();

    List<Street> selectStreetByDistrictId(Integer districtId);

    int insert(House house);

    Page<House> selectByMe(@Param("userId")Integer userId,
                           @Param("pageNum")Integer pageNum,
                           @Param("pageSize")int pageSize);

    House selectById(Integer hid);

    List<Types> selectTypes();

    int update(House house);

    int deleteById(Integer id);
}
